package com.lwj.vo.configuration;

import com.lwj.utils.BuildTreeBean;

import java.util.ArrayList;
import java.util.List;

public class DepartmentRoleMenuVo implements BuildTreeBean {
    private String menuId;
    private String parentId;
    private String menuName;
    private String currentLevel;
    private String nextLevel;
    private String departmentRoleMenuId;

    private List<DepartmentRoleMenuVo> children;

    public String getDepartmentRoleMenuId() {
        return departmentRoleMenuId;
    }

    public void setDepartmentRoleMenuId(String departmentRoleMenuId) {
        this.departmentRoleMenuId = departmentRoleMenuId;
    }

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getCurrentLevel() {
        return currentLevel;
    }

    public void setCurrentLevel(String currentLevel) {
        this.currentLevel = currentLevel;
    }

    public String getNextLevel() {
        return nextLevel;
    }

    public void setNextLevel(String nextLevel) {
        this.nextLevel = nextLevel;
    }
    public void addChild(DepartmentRoleMenuVo menuVo){
        if(this.children==null){
            this.children=new ArrayList<>();
        }
        this.children.add(menuVo);
    }

    @Override
    public List children() {
        if(this.children==null){
            this.children=new ArrayList<>();
        }
        return  this.children;
    }

    public String id(){
        return getMenuId();
    }
    public String parentId(){
        return getParentId();
    }

    public List<DepartmentRoleMenuVo> getChildren() {
        return children;
    }

    public void setChildren(List<DepartmentRoleMenuVo> children) {
        this.children = children;
    }
}
